// The overloading relationship must meet the following conditions
//	1.In the same scope
//	2.Have the same function name
//	3.They have different parameter table


#include <iostream>
#include <cstring>

using namespace std;


// They are overload relationship
void foo( char* c, short s ) {cout << "1.foo" << endl;}
void foo( int i, double d ) {cout << "2.foo" << endl;}
void foo( const char* c, short s ) {cout << "3.foo" << endl;}
void foo( double d, int i ) {cout << "4.foo" << endl;}

/*
int foo(double d, int i ) {} 	// It's not a overload
				// It's have no relation with respond type

void foo( int d, double i ) {}	// It's not a overload
				// It's redefinition
*/


int main( void ){
	char* c;
	short s;

	foo( c, s );		// 1

	const char* cc;
	foo( cc, s );		// 3

	int i;
	double d;
	foo( i, d );		// 2
	foo( d, i );		// 4

	return 0;
}




